package com.lonely.goods.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.lonely.goods.domain.dto.material.MaterialItemPageQueryDTO;
import com.lonely.goods.domain.entity.SysMaterialItem;
import com.lonely.goods.domain.vo.material.items.MaterialItemPageVO;
import com.lonely.goods.domain.vo.material.items.MaterialItemVO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author : 黄志标
 * @date: 2025/7/10 10:04
 * @description: 物料明细mapper
 */
public interface SysMaterialItemMapper extends BaseMapper<SysMaterialItem> {


    /**
     * 物料分页列表查询
     *
     * @param page
     * @param queryDto
     * @return
     */
    Page<MaterialItemPageVO> page(Page<MaterialItemPageVO> page, @Param("query") MaterialItemPageQueryDTO queryDto);

    /**
     * 根据物料明细id查询物料明细详情
     *
     * @param materialItemId
     * @return
     */
    MaterialItemVO getMaterialItemDetailById(@Param("materialItemId") Long materialItemId);

    /**
     * 根据物料明细id查询物料明细详情
     *
     * @param materialItemIds
     * @return
     */
    List<MaterialItemVO> batchQueryMaterialItemDetailByIds(@Param("materialItemIds") List<Long> materialItemIds);
}
